package pl.mikei.deliverydroid;

import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;
import android.view.WindowManager;

public class PrefsActivity extends PreferenceActivity {

//	private SharedPreferences prefs;
//	private TextView pFullScreen;
	
	Boolean pBFullscreen;

	public void onCreate(Bundle savedInstanceState) {
		//requestWindowFeature(Window.FEATURE_NO_TITLE);
		
		super.onCreate(savedInstanceState);
		addPreferencesFromResource(R.xml.preferences);

//		prefs = getSharedPreferences("fullscreen", Activity.MODE_PRIVATE);
//		pFullScreen = (TextView) findViewById(R.id.toggle_fullscreen);

		getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
		getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
	}

	public void onResume() {
		super.onResume();
//		pFullScreen.setText(new Boolean(prefs.getBoolean(
//				getString(R.id.toggle_fullscreen), false)).toString());
	}
	
	private void getPrefs() {
		SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
		
		pBFullscreen = prefs.getBoolean("toggle_fullscreen", false);
	}
	
	@Override
	public void onStart() {
		super.onStart();
		getPrefs();
	}
}
